import request from '@/utils/request'

// 查询资产耗材列表
export function listConsumable(query) {
    return request({
        url: '/basic/consumable/list',
        method: 'get',
        params: query
    })
}

// 查询资产耗材列表（库存预警信息）
export function listConsumableE() {
    return request({
        url: '/basic/consumable/list/alert',
        method: 'get'
    })
}

// 查询资产耗材详细
export function getConsumable(id) {
    return request({
        url: '/basic/consumable/' + id,
        method: 'get'
    })
}

// 新增资产耗材
export function addConsumable(data) {
    return request({
        url: '/basic/consumable',
        method: 'post',
        data: data
    })
}

// 修改资产耗材
export function updateConsumable(data) {
    return request({
        url: '/basic/consumable',
        method: 'put',
        data: data
    })
}

// 删除资产耗材
export function delConsumable(id) {
    return request({
        url: '/basic/consumable/' + id,
        method: 'delete'
    })
}


// 提交资产耗材申请
export function addConsumableApply(data) {
    return request({
        url: '/basic/consumable/applyAdd',
        method: 'post',
        data: data
    })
}
